package com.tuozixuan.liteflow.api.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

import com.tuozixuan.liteflow.api.DemoApi;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;

import jakarta.annotation.Resource;

@RestController
public class DemoApiImpl implements DemoApi {
	
	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Resource
    private FlowExecutor flowExecutor;

	@Override
	public void test() {
		LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
		logger.info("response:{}", response);
	}

}
